package com.dianping.cat.consumer.transaction.model.entity;

import com.dianping.cat.consumer.transaction.model.BaseEntity;
import com.dianping.cat.consumer.transaction.model.IVisitor;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;








public class Range
  extends BaseEntity<Range>
{
  private int m_value;
  private int m_count;
  private double m_sum;
  private double m_avg;
  private int m_fails;
/*  23 */   private double m_min = 8.64E7D;

  private double m_max = -1.0D;

  private double m_line95Value;

  private double m_line99Value;

  private double m_line999Value;

  private double m_line90Value;

/*  35 */   private Map<Integer, AllDuration> m_allDurations = new ConcurrentHashMap();


  private boolean m_clearDuration;


  private double m_line50Value;


  private double m_line9999Value;


/*  47 */   public Range(int value) { this.m_value = value; }




/*  52 */   public void accept(IVisitor visitor) { visitor.visitRange(this); }


  public Range addAllDuration(AllDuration allDuration) {
/*  56 */     this.m_allDurations.put(Integer.valueOf(allDuration.getValue()), allDuration);
/*  57 */     return this;
  }


  public boolean equals(Object obj) {
/*  62 */     if (obj instanceof Range) {
/*  63 */       Range _o = (Range)obj;

/*  65 */       if (getValue() != _o.getValue()) {
/*  66 */         return false;
      }

/*  69 */       return true;
    }

/*  72 */     return false;
  }


/*  76 */   public AllDuration findAllDuration(int value) { return (AllDuration)this.m_allDurations.get(Integer.valueOf(value)); }


  public AllDuration findOrCreateAllDuration(int value) {
/*  80 */     AllDuration allDuration = (AllDuration)this.m_allDurations.get(Integer.valueOf(value));

/*  82 */     if (allDuration == null) {
/*  83 */       synchronized (this.m_allDurations) {
/*  84 */         allDuration = (AllDuration)this.m_allDurations.get(Integer.valueOf(value));

/*  86 */         if (allDuration == null) {
/*  87 */           allDuration = new AllDuration(value);
/*  88 */           this.m_allDurations.put(Integer.valueOf(value), allDuration);
        }
      }
    }

/*  93 */     return allDuration;
  }


/*  97 */   public Map<Integer, AllDuration> getAllDurations() { return this.m_allDurations; }



/* 101 */   public double getAvg() { return this.m_avg; }



/* 105 */   public boolean getClearDuration() { return this.m_clearDuration; }



/* 109 */   public int getCount() { return this.m_count; }



/* 113 */   public int getFails() { return this.m_fails; }



/* 117 */   public double getLine50Value() { return this.m_line50Value; }



/* 121 */   public double getLine90Value() { return this.m_line90Value; }



/* 125 */   public double getLine95Value() { return this.m_line95Value; }



/* 129 */   public double getLine9999Value() { return this.m_line9999Value; }



/* 133 */   public double getLine999Value() { return this.m_line999Value; }



/* 137 */   public double getLine99Value() { return this.m_line99Value; }



/* 141 */   public double getMax() { return this.m_max; }



/* 145 */   public double getMin() { return this.m_min; }



/* 149 */   public double getSum() { return this.m_sum; }



/* 153 */   public int getValue() { return this.m_value; }





  public Range incCount() {
/* 166 */     this.m_count++;
/* 167 */     return this;
  }

  public Range incCount(int count) {
/* 171 */     this.m_count += count;
/* 172 */     return this;
  }

  public Range incFails() {
/* 176 */     this.m_fails++;
/* 177 */     return this;
  }

  public Range incFails(int fails) {
/* 181 */     this.m_fails += fails;
/* 182 */     return this;
  }


/* 186 */   public boolean isClearDuration() { return this.m_clearDuration; }



  public void mergeAttributes(Range other) {
/* 191 */     assertAttributeEquals(other, "range", "value", Integer.valueOf(this.m_value), Integer.valueOf(other.getValue()));

/* 193 */     this.m_count = other.getCount();

/* 195 */     this.m_sum = other.getSum();

/* 197 */     this.m_avg = other.getAvg();

/* 199 */     this.m_fails = other.getFails();

/* 201 */     this.m_min = other.getMin();

/* 203 */     this.m_max = other.getMax();

/* 205 */     this.m_line95Value = other.getLine95Value();

/* 207 */     this.m_line99Value = other.getLine99Value();

/* 209 */     this.m_line999Value = other.getLine999Value();

/* 211 */     this.m_line90Value = other.getLine90Value();

/* 213 */     this.m_clearDuration = other.getClearDuration();

/* 215 */     this.m_line50Value = other.getLine50Value();

/* 217 */     this.m_line9999Value = other.getLine9999Value();
  }


/* 221 */   public AllDuration removeAllDuration(int value) { return (AllDuration)this.m_allDurations.remove(Integer.valueOf(value)); }


  public Range setAvg(double avg) {
/* 225 */     this.m_avg = avg;
/* 226 */     return this;
  }

  public Range setClearDuration(boolean clearDuration) {
/* 230 */     this.m_clearDuration = clearDuration;
/* 231 */     return this;
  }

  public Range setCount(int count) {
/* 235 */     this.m_count = count;
/* 236 */     return this;
  }

  public Range setFails(int fails) {
/* 240 */     this.m_fails = fails;
/* 241 */     return this;
  }

  public Range setLine50Value(double line50Value) {
/* 245 */     this.m_line50Value = line50Value;
/* 246 */     return this;
  }

  public Range setLine90Value(double line90Value) {
/* 250 */     this.m_line90Value = line90Value;
/* 251 */     return this;
  }

  public Range setLine95Value(double line95Value) {
/* 255 */     this.m_line95Value = line95Value;
/* 256 */     return this;
  }

  public Range setLine9999Value(double line9999Value) {
/* 260 */     this.m_line9999Value = line9999Value;
/* 261 */     return this;
  }

  public Range setLine999Value(double line999Value) {
/* 265 */     this.m_line999Value = line999Value;
/* 266 */     return this;
  }

  public Range setLine99Value(double line99Value) {
/* 270 */     this.m_line99Value = line99Value;
/* 271 */     return this;
  }

  public Range setMax(double max) {
/* 275 */     this.m_max = max;
/* 276 */     return this;
  }

  public Range setMin(double min) {
/* 280 */     this.m_min = min;
/* 281 */     return this;
  }

  public Range setSum(double sum) {
/* 285 */     this.m_sum = sum;
/* 286 */     return this;
  }

  public Range setValue(int value) {
/* 290 */     this.m_value = value;
/* 291 */     return this;
  }

  public Range() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/transaction/model/entity/Range.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */